package com.ikkong.shine.meta.intercept;

import java.util.List;
import java.util.Map;

import com.ikkong.core.aop.AopContext;
import com.ikkong.core.meta.PageIntercept;
import com.ikkong.core.toolbox.Func;
import com.ikkong.core.toolbox.support.BladePage;

public class TriageIntercept extends PageIntercept {

	/**
	 * 查询后附加字典项
	 */
	@SuppressWarnings("unchecked")
	@Override
	public void queryAfter(AopContext ac) {
		BladePage<Map<String, Object>> page = (BladePage<Map<String, Object>>) ac.getObject();
		List<Map<String, Object>> list = page.getRows();
		
		for (Map<String, Object> map : list) {
			//将triage_type状态转换成汉字
			map.put("triage_type", Func.getDictName(110, map.get("triage_type")));
			map.put("pager_type", Func.getDictName(111, map.get("pager_type")));
			map.put("reorder_type", Func.getDictName(112, map.get("reorder_type")));
			map.put("return_flag_step", Func.getDictName(113, map.get("return_flag_step")));
			map.put("call_buffer", Func.getDictName(114, map.get("call_buffer")));
		}
	}
}
